import { createStore } from "vuex"

export default createStore({
  state: {
    list: [
      { name: "zs", age: 18 },
      { name: "ls", age: 19 },
      { name: "老王", age: 21 }
    ]
  },
  mutations: {
    updateList(state, data) {
      state.list = data
      console.log(data)
    }
  },
  actions: {},
  getters: {},
  modules: {}
})
